<script type="text/javascript">
$('#codice').keyup(function(e) {
    if(e.keyCode == 13 || e.keyCode==35) {
		var jrole = $('#codice').val();
        searchbook(jrole);
		codice.value='';
    }
});

function searchbook(value) {
		if (value.length>=2)
		{
			$('#tablib').fadeOut(1000,function(){$('#tablib').load("magazzino/tabellalibri.php?id="+value,'',$('#tablib').fadeIn(1000));}); 
		}
}

</script>


<p>EAN:<input type="text" name='codice' id="codice"> </p>
<div id="tablib"></div>

